package com.newland.flow.model
{
	import com.adobe.cairngorm.model.ModelLocator;
	import com.newland.flow.view.LinkLineView;
	
	import mx.collections.ArrayCollection;
	import mx.core.UIComponent;

	public class ProcessModuleLocator implements ModelLocator
	{
		private static var module:ProcessModuleLocator;
		public var nodeCollection:ArrayCollection = new ArrayCollection;//流程上的所有节点
		public var lineCollection:ArrayCollection = new ArrayCollection;//流程上的所有连接线
		public var lastClickNode:UIComponent;//上次选择的节点
		public var lastClickLinkLine:LinkLineView;//上次选择的连接线
		public var linkObjectCollection:ArrayCollection = new ArrayCollection;//需要需要建立链接的2个节点
		public var nodeType:String = "";
		public var saveEnable:Boolean = false;
		public var removeEnable:Boolean = false;
		public var size:int = 1;
		public var clickNode:UIComponent;//选中的节点对象
		
		public static function getInstance():ProcessModuleLocator {
			if(module == null) {
				module = new ProcessModuleLocator(new SingleClass());
			}
			return module;
		}
		public function ProcessModuleLocator(single:SingleClass) {
			if(single == null)
				throw new Error( "You Can Only Have One ProcessModelLocator" );
		}
	}
}
class SingleClass{}